/* 公共样式 */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f9f9f9;
    color: #333;
    height: 100vh;
    overflow-x: hidden;
}

/* iOS 状态栏 */
.status-bar {
    height: 44px;
    background-color: #ffffff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 16px;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid #f0f0f0;
}

.status-bar-time {
    font-weight: 600;
}

.status-bar-icons {
    display: flex;
    gap: 5px;
}

/* 底部导航栏 */
.tab-bar {
    height: 83px;
    background-color: rgba(255, 255, 255, 0.95);
    border-top: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-around;
    align-items: center;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding-bottom: 20px; /* 为iPhone底部安全区域留出空间 */
}

.tab-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #8e8e93;
    font-size: 10px;
    padding: 8px 0;
}

.tab-item.active {
    color: #007aff;
}

.tab-icon {
    font-size: 22px;
    margin-bottom: 4px;
}

/* 内容区域 */
.content {
    padding: 20px 16px;
    padding-bottom: 100px; /* 为底部导航栏留出空间 */
    min-height: calc(100vh - 44px - 83px);
}

/* 按钮样式 */
.btn-primary {
    background-color: #007aff;
    color: white;
    border-radius: 12px;
    padding: 14px 20px;
    font-weight: 600;
    border: none;
    width: 100%;
    font-size: 16px;
}

.btn-secondary {
    background-color: #f2f2f7;
    color: #007aff;
    border-radius: 12px;
    padding: 14px 20px;
    font-weight: 600;
    border: none;
    width: 100%;
    font-size: 16px;
}

/* 卡片样式 */
.card {
    background-color: white;
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 16px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

/* 表单元素 */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
}

.form-input {
    width: 100%;
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px solid #e0e0e0;
    background-color: #f9f9f9;
    font-size: 16px;
}

.form-select {
    width: 100%;
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px solid #e0e0e0;
    background-color: #f9f9f9;
    font-size: 16px;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23333' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}

/* 进度条 */
.progress-container {
    height: 8px;
    background-color: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
    margin: 10px 0;
}

.progress-bar {
    height: 100%;
    background-color: #007aff;
    border-radius: 4px;
}

/* 标题样式 */
.page-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 20px;
    color: #000;
}

.section-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 16px;
    color: #000;
}

/* 列表样式 */
.list-item {
    padding: 16px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.list-item:last-child {
    border-bottom: none;
}

/* 水滴图标 */
.water-drop {
    color: #007aff;
    font-size: 24px;
}

/* 图表容器 */
.chart-container {
    width: 100%;
    height: 200px;
    margin: 20px 0;
    background-color: #fff;
    border-radius: 16px;
    padding: 16px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

/* 快速添加按钮 */
.quick-add {
    position: fixed;
    bottom: 100px;
    right: 20px;
    width: 60px;
    height: 60px;
    background-color: #007aff;
    border-radius: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-size: 24px;
    box-shadow: 0 4px 12px rgba(0, 122, 255, 0.3);
}

/* 饮水类型图标 */
.drink-type {
    width: 40px;
    height: 40px;
    border-radius: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-right: 12px;
    color: white;
}

.drink-water {
    background-color: #007aff;
}

.drink-tea {
    background-color: #34c759;
}

.drink-coffee {
    background-color: #a2845e;
}

.drink-juice {
    background-color: #ff9500;
}

/* 分段控制器 */
.segmented-control {
    display: flex;
    background-color: #f2f2f7;
    border-radius: 10px;
    padding: 2px;
    margin-bottom: 20px;
}

.segment {
    flex: 1;
    text-align: center;
    padding: 10px;
    border-radius: 8px;
    font-weight: 500;
    font-size: 14px;
    color: #8e8e93;
}

.segment.active {
    background-color: white;
    color: #007aff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}